#include <iostream>
using namespace std;
#define maxn 5005
int n, L[maxn], W[maxn], l, w;
int main()
{
    cin >> n;
    for (int i = 0; i < n; ++i)
    {
        cin >> l >> w;
        L[i] = l, W[i] = w;
    }

    return 0;
}